/*
    This file is part of Emu.

    Emu is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Emu is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Emu.  If not, see <http://www.gnu.org/licenses/>. */
#ifndef ETRIGGEREDITOR_H
# define ETRIGGEREDITOR_H

# include <QCheckBox>
# include <QColor>
# include <QComboBox>
# include <QDialog>
# include <QLineEdit>
# include <QTextEdit>

# include "eprefbutton.h"
# include "etrigger.h"

class ETriggerEditor : public QDialog
{
    Q_OBJECT

public:
    ETriggerEditor(QWidget *, bool);

    ETrigger trigger() { return _trigger; }

    void useTrigger(ETrigger);

private:
    EPrefButton *_highlightButton;
    ETrigger _trigger;

    QCheckBox *_caseCheck;
    QCheckBox *_continueCheck;
    QColor _highlightColor;
    QComboBox *_actionCombo;
    QComboBox *_patternCombo;
    QLineEdit *_nameLine;
    QLineEdit *_patternLine;
    QTextEdit *_replyEdit;

private slots:
    void actionChanged(int);
    void highlightClicked();
    void validate();
};

#endif
